package org.dding.msc.service.management;

import java.util.List;

/**
 * The service container management bean interface.
 *
 */
public interface ServiceContainerMBean {

    /**
     * Get the status of one service.
     *
     * @param name the service name
     * @return the status
     */
    ServiceStatus getServiceStatus(String name);

    /**
     * Get a list of service names in this container.
     *
     * @return the list of names
     */
    List<String> queryServiceNames();

    /**
     * Get a list of service statuses in this container.
     *
     * @return the list of statuses
     */
    List<ServiceStatus> queryServiceStatuses();

    /**
     * Change the mode of a service.
     *
     * @param name the service name
     * @param mode the new mode
     */
    void setServiceMode(String name, String mode);

    /**
     * Dump the container state to the console.
     */
    void dumpServices();

    /**
     * Dump the container state to a big string.  The string has no particular standard format and may
     * change over time; this method is simply a convenience.
     *
     * @return the container state, as a string
     */
    String dumpServicesToString();
    
	boolean stopService(String serviceName);
	boolean startService(String serviceName);
	boolean removeService(String serviceName);
	boolean waitService(String serviceName);
}
